﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ForumCategoriesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Forum.ForumCategoriesAdmin" %>
<p>
    <a href="BlogCategoriesEdit.aspx">Thêm</a>
</p>
<owc:OwGrid ID="ForumCategoiesAdmin" runat="server" SkinID="OwGridAdmin" DataSourceID="ForumCategoiesAdminOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True" AllowCustomPaging="true"
    AllowPaging="true" PageSize="3" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="ForumCategoiesAdminOds" DataKeyNames="ForumCategoryID">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("ForumCategoryID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn DataField="ThumbImage" FilterControlAltText="Filter ThumbImage column"
                HeaderText="<%$OwR:ThumbImage %>" SortExpression="ThumbImage" UniqueName="ThumbImage"
                Visible="true" AllowFiltering="False" ConvertEmptyStringToNull="False">
                <ItemTemplate>
                    <asp:Image ID="ImageThumb" runat="server" ImageUrl='<%# Eval("ThumbImage") %>' Height="100px"
                        Width="100px" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%# Eval("Name")%></i>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeCreatedLabelOwR" runat="server" OwText="DateTimeCreatedLabel"
                                    OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("DateTimeCreated").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeEditLabelOwR" runat="server" OwText="DateTimeEditedLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("DateTimeEdited").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="CreatingUserLabel" runat="server" Text='<%$ Ow: string.Format("{0}/{1}",Resources.OpenWeb.CreatingUserLabel,Resources.OpenWeb.EditingUserLabel)%>' />:
                            </td>
                            <td>
                                <%#Eval("CreatingUser")!=null? (Membership.GetUser(Eval("CreatingUser"))!=null?Membership.GetUser(Eval("CreatingUser")).UserName:"n/a"):"" +" /" %>
                                <%#Eval("EditingUser") != null ? (Membership.GetUser(Eval("EditingUser")) != null ? Membership.GetUser(Eval("EditingUser")).UserName : "") : ""%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Literal ID="LanguageLabel" runat="server" Text="<%$ OwR: Language%>" />:
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="PortalLabelOwR" runat="server" OwText="PortalLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Micronet.OpenWeb.Com.BLL.OwPortalsBLL.OwGetEntity((long?)Eval("PortalID")).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ForumOwR" runat="server" OwText="Forum" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwBlogCategoriesBLL.OwGetEntity((long?)Eval("ForumID")).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="UrLOwR" runat="server" OwText="Url" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("Url") %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Literal ID="EnableLabel" runat="server" Text="<%$ OwR: EnableLabel%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsEnabledCheckBox" runat="server" Checked='<%# Eval("IsEnabled") %>'
                                    Text='<%# Eval("forumCategoryID") %>' OnCheckedChanged="IsEnabledCheckBox_CheckedChanged"
                                    AutoPostBack="True" CssClass="HiddenText" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="HomeDisplayLabel" runat="server" Text="<%$ OwR: HomeDisplayLabel%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsHomeDisplayCheckBox" runat="server" Checked='<%#Eval("IsHomePage")%>'
                                    Text='<%#Eval("forumCategoryID")%>' AutoPostBack="true" CssClass="HiddenText"
                                    OnCheckedChanged="IsHomeDisplayCheckBox_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="IsMenuOwR" runat="server" OwText="isMenu" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsMenuCbb" runat="server" Checked='<%#Eval("IsMenu")%>' AutoPostBack="true"
                                    Text='<%#Eval("forumCategoryID")%>' CssClass="HiddenText" OnCheckedChanged="IsMenuCbb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Eval("IsDeleted")%>'
                                    AutoPostBack="true" Text='<%#Eval("forumCategoryID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsDeletedCheckBox_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/ForumCategoriesEdit.aspx?ID=<%#Eval("forumCategoryID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="ForumCategoiesAdminOds" runat="server" DeleteMethod="OwDelete"
    EnablePaging="true" OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic"
    SelectCountMethod="OwGetByDynamicCount" TypeName="Micronet.OpenWeb.Com.BLL.OwForumCategoriesBLL">
    <DeleteParameters>
        <asp:Parameter Name="forumCategoryID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="portalID" Type="Int64" />
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter Name="code" Type="String" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter DbType="Guid" Name="creatingUser" />
        <asp:Parameter DbType="Guid" Name="editingUser" />
        <asp:Parameter DbType="Guid" Name="deletingUser" />
        <asp:Parameter Name="isHomePage" Type="Boolean" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="forumID" Type="Int64" />
        <asp:Parameter Name="isMenu" Type="Boolean" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwNotification ID="OwN" runat="server" Animation="Slide" AutoCloseDelay="5000"
    ContentIcon="" EnableRoundedCorners="true" Height="100" Skin="Office2007" Title="Thông báo"
    Width="200">
</owc:OwNotification>
